home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 June / CHIP Haziran 2001.iso / prog / haziran / 19 / setup.exe / data.z / speaker_lib.h < prev    next >
C/C++ Source or Header  |  2001-04-11  |  1KB  |  56 lines

  1. //////////////////////////////////////////////////////////////////////
  2. // File - speaker_lib.h
  3. //
  4. // Library for accessing the speaker directly on the motherboard.
  5. // Code was generated by WinDriver Wizard.
  6. // Application uses WinDriver to access the hardware.
  7. // 
  8. //////////////////////////////////////////////////////////////////////
  9.  
  10. #ifndef _SPEAKER_LIB_H_
  11. #define _SPEAKER_LIB_H_
  12.  
  13. // 'windrvr.h' is located in the WinDriver include directory,
  14. #include "../../include/windrvr.h"
  15. #include "../shared/bits.h"
  16.  
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20.  
  21. typedef enum
  22. {
  23.     SPEAKER_IO_42 = 0,
  24.     SPEAKER_IO_43 = 1,
  25.     SPEAKER_IO_61 = 2,
  26.     SPEAKER_ITEMS = 3
  27. } SPEAKER_ADDR;
  28.  
  29. // IO ranges definitions
  30. enum { SPEAKER_IO_ADDR42 = 0x42 };
  31. enum { SPEAKER_IO_ADDR43 = 0x43 };
  32. enum { SPEAKER_IO_ADDR61 = 0x61 };
  33.  
  34. typedef struct SPEAKER_STRUCT *SPEAKER_HANDLE;
  35.  
  36. typedef struct SPEAKER_STRUCT
  37. {
  38.     HANDLE hWD;
  39.     WD_CARD_REGISTER cardReg;
  40. } SPEAKER_STRUCT;
  41.  
  42. BOOL SPEAKER_Open (SPEAKER_HANDLE *phSPEAKER);
  43. void SPEAKER_Close(SPEAKER_HANDLE hSPEAKER);
  44.  
  45. void SPEAKER_Tone (SPEAKER_HANDLE hSPEAKER, DWORD dwHz, DWORD dwMilli);
  46.  
  47. // this string is set to an error message, if one occurs
  48. extern CHAR SPEAKER_ErrorString[];
  49.  
  50.  
  51. #ifdef __cplusplus
  52. }
  53. #endif
  54.  
  55. #endif
  56.